﻿using Microsoft.VisualStudio.Debugger.Interop;

namespace Red.Scripts.Debugger.Defines.Breakpoint
{
    public class Error : IDebugErrorBreakpoint2
    {
        #region Public Properties

        public IDebugPendingBreakpoint2 Parent { get; private set; }
        public IDebugErrorBreakpointResolution2 Resolution { get; private set; }

        #endregion Public Properties

        #region C-Tor

        public Error( IDebugPendingBreakpoint2 parent, IDebugErrorBreakpointResolution2 resolution )
        {
            Parent = parent;
            Resolution = resolution;
        }

        #endregion C-Tor

        #region IDebugErrorBreakpoint2

        public int GetBreakpointResolution( out IDebugErrorBreakpointResolution2 ppErrorResolution )
        {
            ppErrorResolution = Resolution;

            return Constants.S_OK;
        }

        public int GetPendingBreakpoint( out IDebugPendingBreakpoint2 ppPendingBreakpoint )
        {
            ppPendingBreakpoint = Parent;

            return Constants.S_OK;
        }

        #endregion IDebugErrorBreakpoint2
    }
}
